package com.wocao.entity;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

import lombok.Data;

/**
 * 楼栋
 *
 * @since 2023-11-29
 */
@Data
@TableName("zy_building")
public class ZyBuilding implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 楼栋id
     */
    @ExcelIgnore
    @TableId(value = "building_id", type = IdType.AUTO)
    private String buildingId;

    /**
     * 楼栋名称
     */
    @ExcelProperty("楼栋名称")
    @ColumnWidth(20)
    private String buildingName;

    /**
     * 楼栋编码
     */
    @ExcelProperty("楼栋编码")
    @ColumnWidth(20)
    private String buildingCode;

    /**
     * 楼栋面积
     */
    @ExcelProperty("楼栋面积")
    @ColumnWidth(20)
    private BigDecimal buildingAcreage;

    /**
     * 小区id
     */
    @ExcelIgnore
    private String communityId;

    /**
     * 创建者
     */
    @ExcelIgnore
    private String createBy;

    /**
     * 创建时间
     */
    @ExcelProperty("创建时间")
    @ColumnWidth(20)
    private LocalDateTime createTime;

    /**
     * 更新者
     */
    @ExcelIgnore
    private String updateBy;

    /**
     * 更新时间
     */
    @ExcelIgnore
    private LocalDateTime updateTime;

    /**
     * 备注
     */
    @ExcelProperty("备注")
    @ColumnWidth(20)
    private String remark;

    /**
     * 楼栋所属小区
     */
    @TableField(exist = false)
    @ExcelIgnore
    private ZyCommunity zyCommunity;

    /**
     * 小区名称
     */
    @TableField(exist = false)
    @ExcelProperty("小区名称")
    @ColumnWidth(20)
    private String communityName;
    /**
     * 保存格式化后时间的属性
     */
    @TableField(exist = false)
    @ExcelIgnore
    private String formattedCreateTime;
}
